'use strict'

class addFood {
    constructor () {
        this.param = '/:id'
    }

    async post (c) {
        let f = JSON.parse(c.body);
        let ret=await c.service.psql.query(`insert into eat(food_id,food_name,food_material,food_step) values($1,$2,$3,$4)`,
                                             [f.food_id,f.food_name,f.food_material,f.food_step]);
        c.send(ret.rows);
    }
}

module.exports = addFood;
